<div class="daytab">
    <?php $i=0;foreach ($data_list as $val){?>
    <p class="<?php if($i==0)echo 'on'?>"><?php echo $val['date']?>（<?php echo $val['week_name']?>）</p>
    <?php $i++;}?>
</div>
<div class="timetab">
    <?php $i=0;foreach ($data_list as $val){?>
    <ul <?php if($i==0)echo 'style="display: block;"'?>>
    <?php foreach ($val['list'] as $key_2=>$val_2){?>
        <li class="<?php if($i==0)echo 'on'?>"><?php echo date('H:i',strtotime($val_2['work_time_start']))?>~<?php echo date('H:i',strtotime($val_2['work_time_end']))?></li>
    <?php $i++;}?>
    </ul>
    <?php }?>
</div>